from rest_framework import serializers

from basic_info.models import Nation, City, Province


class NationSerializer(serializers.ModelSerializer):
    '''
    国家的序列化
    '''

    class Meta:
        model = Nation
        fields = '__all__'


class ProvinceSerializer(serializers.ModelSerializer):
    '''
    省份的序列化
    '''

    class Meta:
        model = Province
        fields = '__all__'


class CitySerializer(serializers.ModelSerializer):
    '''
    城市的序列化
    '''

    class Meta:
        model = City
        fields = '__all__'
